package com.shipment.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shipment.common.Result;
import com.shipment.entity.DeliveryOrder;
import com.shipment.model.delivery.DeliveryOrderDTO;
import com.shipment.model.delivery.DeliveryOrderQuery;

/**
 * 发货订单服务接口
 */
public interface DeliveryOrderService extends IService<DeliveryOrder> {

    /**
     * 创建发货订单
     *
     * @param orderDTO 发货订单DTO
     * @return 操作结果
     */
    Result createDeliveryOrder(DeliveryOrderDTO orderDTO);

    /**
     * 更新发货订单
     *
     * @param orderDTO 发货订单DTO
     * @return 操作结果
     */
    Result updateDeliveryOrder(DeliveryOrderDTO orderDTO);

    /**
     * 根据ID获取发货订单详情
     *
     * @param id 发货订单ID
     * @return 操作结果
     */
    Result getDeliveryOrderById(Long id);

    /**
     * 删除发货订单
     *
     * @param id 发货订单ID
     * @return 操作结果
     */
    Result deleteDeliveryOrder(Long id);

    /**
     * 分页查询发货订单
     *
     * @param query 查询条件
     * @return 分页结果
     */
    IPage<DeliveryOrder> pageDeliveryOrders(DeliveryOrderQuery query);

    /**
     * 更新订单状态
     *
     * @param id 订单ID
     * @param status 订单状态
     * @return 操作结果
     */
    Result updateOrderStatus(Long id, Integer status);
}
